"""
Extremally simple library for browsing various version
control systems. Only reading from repositories are now
supported. By now, no writing-to-repo functionality
is being developed.
"""

__version__ = '0.1.0'

from vcbrowser.enumerations import RepositoryType
from vcbrowser.engine import engine_by_alias, engine_from_url

def create_engine(repo_url, type=None):
    """
    Returns engine of the given type and at given repository url.
    """
    if not type:
        return engine_from_url(repo_url)
    Engine = engine_by_alias(type)
    return Engine(repo_url)

